<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ attribute name="url" type="java.lang.String" required="true"%>
<%@ attribute name="title" type="java.lang.String" required="false"%>
<%@ attribute name="width" type="java.lang.String" required="false"%>
<%@ attribute name="height" type="java.lang.String" required="false"%>
<%@ attribute name="style" type="java.lang.String" required="false"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<c:choose>
	<c:when test="${fn:startsWith(url, 'http')}">
		<img alt="${title}" src="${url}" style="${style}" width="${width}" height="${height}" />
	</c:when>
	<c:otherwise>
		<c:if test="${url == null || url ==''}">
			<c:set var="url" value="/resources/images/noimage.jpg"></c:set>
		</c:if>
		<img alt="${title}" src="${ctx}/${url}"  style="${style}" width="${width}" height="${height}" />
	</c:otherwise>
</c:choose>